package com.alm.handle.mapper;

import com.alm.handle.core.domain.entity.SysDevInfo;
import com.alm.handle.core.domain.entity.rq.GetWayInfoRq;
import com.alm.handle.core.domain.entity.rq.LableInfoRq;
import com.alm.handle.core.domain.entity.rq.SysDevInfoDevRq;
import com.alm.handle.core.domain.entity.rs.DevInfoPageRs;
import com.alm.handle.core.domain.entity.rs.HomePageCountData;
import com.alm.handle.core.domain.entity.rs.LableInfoDataRs;
import com.alm.handle.core.domain.entity.vo.DevInfoCountVO;
import com.alm.handle.core.domain.entity.vo.DevInfoListVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysDevInfoMapper extends BaseMapper<SysDevInfo> {

    List<DevInfoPageRs> selectDevInfoList(SysDevInfoDevRq rq);


    List<SysDevInfo> queryByGetWay(GetWayInfoRq getWayInfoRq);


    List<SysDevInfo> queryByLabel(LableInfoRq lableInfoRq);


    SysDevInfo  queryByLabelByid(Integer id);


    LableInfoDataRs queryImgInfo(Integer id);


    HomePageCountData querHomePage(Long commId);

    /**
     * 获取设备分组id - 设备数量映射 map
     * @param groupIds
     * @return
     */
    List<DevInfoCountVO> getCountByDevGroupIds(@Param("groupIds") List<Integer> groupIds);

    /**
     * 获取分组下的设备信息
     * @param devGroupId
     * @return
     */
    List<DevInfoListVO> getDevInfoByGroupId(@Param("devGroupId") Integer devGroupId);

    /**
     * 获取在线设备mac下拉框
     * @return
     */
    List<SysDevInfo> getOnlineMac();
}
